/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 涛
 * Date: 2023-09-21
 * Time: 15:55
 */
class MyArray {
    public Object[] arrary = new Object[10];

    public Object getPos(int pos) {
        return this.arrary[pos];
    }
    public void setPos(int pos, Object val) {
        this.arrary[pos] = val;
    }
}
public class Test1 {
    public static void main(String[] args) {
        MyArray myarray = new MyArray();
        myarray.setPos(0, 10);
        myarray.setPos(1,"string");
        //String str1 = myarray.getPos(1);
        //int i = myarray.getPos(0);
    }
    public static void main3(String[] args) {
        Integer a = 127;
        Integer b = 127;

        Integer c = 200;
        Integer d = 200;

        System.out.println(a == b);
        System.out.println(c == d);
    }
    public static void main2(String[] args) {
        int i = 10;
        //自动装箱
        Integer ii = i;
        Integer ij = (Integer) i;
        //自动拆箱
        int j = ii;
        int j2 = (int)ij;
    }
    public static void main1(String[] args) {
        int i = 10;
        //装箱
        Integer ii = Integer.valueOf(i);
        Integer ij = new Integer(i);
        //拆箱
        int j = ii.intValue();
    }
}
